package com.hualan.service;

import com.hualan.domain.UserMarkTeacher;
import com.hualan.domain.Usermark;
import com.hualan.mapper.UsermarkMapper;
import com.hualan.service.impl.UsermarkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UsermarkServiceImpl implements UsermarkService {

    @Autowired
    private UsermarkMapper usermarkMapper;

    @Override
    public List<UserMarkTeacher> findUserMarkTeacher() {
        return usermarkMapper.getUserMarkTeacher();
    }

    @Override
    public int insertUserMark(Usermark usermark) {
        return usermarkMapper.insertSelective(usermark);
    }

    @Override
    public int updateUserMark(Usermark usermark) {
        return usermarkMapper.updateByPrimaryKeySelective(usermark);
    }

    @Override
    public int deleteUserMark(Long id) {
        return usermarkMapper.deleteByPrimaryKey(id);
    }

    @Override
    public List<UserMarkTeacher> findLikeUserMark(String message) {
        return usermarkMapper.findLikeUserMark(message);
    }
}
